<?php

namespace Rebecca\RebeccaBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class LibranzasType extends AbstractType
{
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder
             ->add('tipo', 'choice', array('choices' => 
                array(
                    '1' => 'Aportes AFC', 
                    '2' => 'Aportes AFP',
                    '3' => 'Aportes',
                    '4' => 'Cooperativa',
                    '5' => 'Libranza',
                    '6' => 'Plan Complementario',
                    '7' => 'Sindicato',
                    ), 
                'label' => 'Tipo'))    
            ->add('idBeneficiario', 'entity', array('class' => 'RebeccaBundle:BeneficiariosLibranzas', 'property' => 'nombre', 'label' => 'Beneficiario'))           
            ->add('numeroLibranza', null, array('label' => 'Referencia'))            
            ->add('monto', null, array('label' => 'Monto Total'))
            ->add('cuota', null, array('label' => 'Valor Cuota'))
            ->add('Saldo', null, array('label' => 'Saldo'))
            ->add('fechaInicio', null, array('widget' => 'single_text', 'format' => 'd/M/yyyy', 'label' => 'Fecha de Inicio'))      
        ;
    }

    public function getName()
    {
        return 'rebecca_rebeccabundle_libranzastype';
    }
}
